package xdu.lz.protocol.http;

import xdu.lz.framework.RequestWrap;
import xdu.lz.protocol.Protocol;
import xdu.lz.framework.URL;

/**
 * Http协议暴露
 */
public class HttpProtocol implements Protocol {

    @Override
    public void export(URL url) {
        new HttpServer().export(url.getHostname(), url.getPort());
    }

    @Override
    public String refer(URL url, RequestWrap invocation) {
        return new HttpClient().
                refer(url.getHostname(), url.getPort(),invocation);
    }
}
